# -*- mode: snippet -*-
# name: xhrfun
# key: xhrfun
# --
xhr.open(${1:"GET"},${2:'${3:url}'},${4:true})
${5:xhr.onreadystatechange = function()
{
    if(xhr.readyState ==4)
    {
	$6
    }
}}
xhr.send($7);$0